package com.yf.dao;

import com.yf.bean.CollectionBean;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class CollectDao extends BaseDao{
    public int addCollect(List<CollectionBean> d) {
        return this.sessionTemplate.insert(getStatement("addCollect"), d);
    }

    public List<CollectionBean> selectCollect(Integer uid) {
        return this.sessionTemplate.selectList(getStatement("selectCollect"), uid);
    }

    public int deleteById(Map<String, Object> params) {
        return sessionTemplate.update(getStatement("deleteById"), params);
    }

    public List<CollectionBean> getCollectByUidSub(Map<String, Object> params) {
        return sessionTemplate.selectList(getStatement("getCollectByUidSub"), params);
    }
}
